<template>
  <div class="estimate_body">
    <div class="estimate_main">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="全部" name="all"> </el-tab-pane>
        <el-tab-pane label="土地" name="land"> </el-tab-pane>
        <el-tab-pane label="标准厂房" name="workshop"> </el-tab-pane>
        <el-tab-pane label="商业楼宇" name="building"> </el-tab-pane>
      </el-tabs>
      <SWhole v-if="activeName == 'all'" />
      <SLand v-if="activeName == 'land'" />
      <SWorkshop v-if="activeName == 'workshop'" />
      <SBuilding v-if="activeName == 'building'" />
    </div>
  </div>
</template>

<script>
import SLand from "./sland.vue";
import SWorkshop from "./sworkshop.vue";
import SBuilding from "./sbuilding.vue";
import SWhole from "./swhole.vue";
export default {
  components: {
    SLand,
    SWorkshop,
    SBuilding,
    SWhole,
  },
  data() {
    return {
      activeName: "all",
      double: "",
      center: { lng: 112.48699, lat: 37.94036 }, //经纬度
      zoom: 9, //地图展示级别
      value: "",
      isHigh: true,
      options: [
        {
          value: 1,
          label: "选项1",
        },
        {
          value: 2,
          label: "选项2",
        },
        {
          value: 3,
          label: "选项3",
        },
        {
          value: 4,
          label: "选项4",
        },
      ],
      currentPage: 1,
    };
  },
  methods: {
    handleClick(val) {
      console.log(val.name);
    },
    goDetails(type) {
      if (type == 1) {
        this.$router.push({ name: "land" });
      } else if (type == 2) {
        this.$router.push({ name: "workshop" });
      } else if (type == 3) {
        this.$router.push({ name: "building" });
      }
    },
    handleSizeChange(val) {},
    handleCurrentChange(val) {},
  },
};
</script>

<style lang="less" scoped>
.tips {
  margin: 20px 0;
  text-align: left;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #333333;
}
.list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  li {
    box-sizing: border-box;
    position: relative;
    flex: 0 0 48%;
    padding: 15px 20px;
    height: 118px;
    text-align: left;
    background: #ffffff;
    box-shadow: 0px 0px 10px 0px rgba(4, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    .title {
      position: relative;
      font-size: 18px;
      padding-bottom: 6px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #446db3;
      border-bottom: 1px solid #ccc;
      cursor: pointer;

      &::before {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 60px;
        height: 1px;
        background: #446db3;
      }
    }
    p {
      margin-top: 10px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
      &:last-of-type {
        margin-top: 6px;
      }
    }
    .flex-li {
      display: flex;
      p {
        flex: 1;
      }
    }
    span {
      position: absolute;
      right: 20px;
      bottom: 12px;
      width: 60px;
      height: 24px;
      line-height: 24px;
      text-align: center;
      cursor: pointer;
      background: #5889dc;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #ffffff;
      border-radius: 4px;
    }
  }
}
.init {
  transition: 0.8s;
  transform: rotate(180deg);
}
.rotate {
  transform: rotate(0);
}

.bm-view {
  width: 100%;
  height: 100%;
  /deep/.BMapLabel {
    background-color: transparent !important;
    border: 0 !important;
    color: rgb(121, 22, 22) !important;
  }
}
.estimate_body {
  width: 100%;
}
.estimate_main {
  width: 100%;
  height: 100%;
}
.map-main {
  height: calc(100% - 60px);
  padding: 30px 20px;
  display: flex;
  .map-left {
    flex: 1;
    background: #ffffff;
    box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
    border-radius: 10px;
  }
  .map-right {
    flex: 0 0 815px;
    margin-left: 30px;
  }
}
.search {
  position: relative;
}
/deep/ .search .el-input {
  width: 100%;
  height: 60px;
  line-height: 60px;
  background: #ffffff;
  box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
  border-radius: 10px;
}

/deep/ .search .el-input__inner {
  height: 60px;
  line-height: 60px;
  padding-left: 80px;
  padding-right: 270px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333333;

  background: #ffffff;
  box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
  border-radius: 10px;
}
.search span {
  position: absolute;
  right: 0;
  top: 0;
  width: 150px;
  height: 60px;
  line-height: 60px;
  background: #446db3;
  border-radius: 0px 10px 10px 0px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 2px;
  cursor: default;
}
.search .search-icon {
  position: absolute;
  left: 30px;
  top: 15px;
  z-index: 999;
  cursor: default;
}
.search .high {
  position: absolute;
  right: 150px;
  top: 0px;
  width: 115px;
  height: 60px;
  line-height: 60px;
  text-align: left;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 0.6);
  cursor: default;
  img {
    position: absolute;
    top: 28px;
    margin-left: 10px;
  }
}
// 输入框 选择框 样式修改
/deep/ .search .el-input__inner:focus,
/deep/.search .el-input__inner:hover {
  border-color: transparent;
  outline: 0;
}
// 输入框 选择框 样式修改
.options {
  height: 0;
  transition: 0.3s;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin: 28px 0 0;
  li {
    flex: 0 0 29%;
    margin-bottom: 8px;
    &:nth-of-type(4n) {
      flex: 0 0 10%;
    }
    span {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(102, 102, 102, 0.8);
      line-height: 34px;
    }
  }
}
.height {
  height: 84px;
}
/deep/ .el-button--default {
  width: 100px;
  height: 28px;
  line-height: 0px;
  border-radius: 4px;
  font-size: 16px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  border-color: transparent;
}
/deep/ .el-button--primary {
  width: 100px;
  height: 28px;
  line-height: 0px;
  font-size: 16px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #ffffff;
  border-radius: 4px;
  background-color: #446db3;
  border-color: transparent;
}
/deep/.options .el-input {
  display: inline-block;
  width: 150px;
  height: 28px;
}
/deep/.options .el-input__inner {
  display: inline-block;
  width: 150px;
  height: 28px;
  line-height: 28px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cccccc;
  border-radius: 5px;
}
/deep/.options .el-input__inner:focus,
/deep/.options .el-input__inner:hover {
  border-color: #ccc;
  outline: 0;
}
// 修改选择框
/deep/ .options .el-input__icon {
  line-height: 28px;
}
//
/deep/ .options .el-icon-arrow-up:before {
  display: inline-block;
  width: 14px;
  height: 8px;
  content: "";
  background: url("~@img/portrait/icon-select-down.png") no-repeat center;
}
/deep/ .options .el-select .el-input .el-select__caret {
  transform: rotateZ(0);
}
/deep/ .options .el-select .el-input .el-select__caret.is-reverse {
  transform: rotateZ(180deg);
}
// 选项卡样式修改
/deep/.el-tabs__item {
  padding: 0 35px;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333333;
  height: 60px;
  line-height: 60px;
}
/deep/.el-tabs__item.is-active {
  font-weight: bold;
  color: #446db3;
}

/deep/.el-tabs__active-bar {
  height: 4px;
  background: #446db3;
}
/deep/ .el-tabs__nav-wrap {
  box-shadow: 0px 2px 6px 0px rgba(4, 0, 0, 0.1);
}
/deep/ .el-tabs__nav-wrap::after {
  height: 0;
}
/deep/.el-tabs__header {
  margin: 0;
}
/deep/.el-tabs {
  width: 100%;
  .el-tabs__content {
    box-sizing: border-box;
    overflow: unset;
  }
}
/deep/.el-tabs__nav-scroll {
  padding-left: 30px;
}

// 表格分页样式修改
.el-pagination {
  text-align: right;
}
/deep/ .el-pager li {
  width: 30px;
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #666666;
  background: #fafafa;
  box-shadow: 0px 0px 4px 0px rgba(86, 86, 86, 0.11);
  border-radius: 6px;
  margin: 0 8px;
}

/deep/ .el-pager li.active {
  color: #fff;
  background: #446db3;
  box-shadow: 0px 0px 3px 0px rgba(0, 50, 89, 0.4);
  border-radius: 6px;
}

/deep/ .el-pagination .el-icon-arrow-right:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-right.png") no-repeat center;
}
/deep/
  .el-pagination
  button:disabled.btn-next:hover
  .el-icon-arrow-right:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-right.png") no-repeat center;
}
/deep/.el-pagination .btn-next:hover .el-icon-arrow-right:before {
  background: url("~@img/atlas/sidenav-hover2.png") no-repeat center;
}
/deep/ .el-pagination .el-icon-arrow-left:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-left.png") no-repeat center;
}
/deep/
  .el-pagination
  button:disabled.btn-prev:hover
  .el-icon-arrow-left:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-left.png") no-repeat center;
}
/deep/.el-pagination .btn-prev:hover .el-icon-arrow-left:before {
  background: url("~@img/atlas/sidenav-hover1.png") no-repeat center;
}
/deep/.pagination .el-select .el-input.is-focus .el-input__inner {
  height: 30px;
  border-color: #fafafa;
  background: #fafafa;
  box-shadow: 0px 0px 4px 0px rgba(86, 86, 86, 0.11);
  border-radius: 6px;
}
/deep/.pagination .el-input__inner {
  height: 30px;
  color: #666;
  border-color: #fafafa;
  background: #fafafa;
  box-shadow: 0px 0px 4px 0px rgba(86, 86, 86, 0.11);
  border-radius: 6px;
}

/deep/ .el-pagination .btn-next,
/deep/ .el-pagination .btn-prev {
  background-color: transparent;
}
/deep/ .el-pagination .btn-next i,
/deep/ .el-pagination .btn-prev i {
  background: #fafafa;
  box-shadow: 0px 0px 4px 0px rgba(86, 86, 86, 0.11);
  border-radius: 6px;
}

</style>
